//@author A0121492M
public class RedoCommand extends Command {
	public ExecutionReply execute() throws ActionUnavailableException {
		CommandReply r = new CommandReply();
		if (!(Logic.lastCommand < Logic.commandHistory.size() - 1)) {
			throw new ActionUnavailableException();
		}
		Logic.lastCommand++;
		Command command = Logic.commandHistory.get(Logic.lastCommand);
		command.redo();
		r.command = command;
		Logic.saveData();
		return r;
	}

}
